{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% from "macros.html" import sub_nav with context %}
{% from "macros-protocol.html" import split with context %}

{% extends "firefox/base/base-protocol.html" %}

{% block page_title %}{{ ftl('firefox-developer-page-title') }}{% endblock %}
{% block page_desc %}{{ ftl('firefox-developer-firefox-developer-edition-desc') }}{% endblock %}
{% block page_image %}{{ static('protocol/img/logos/firefox/browser/developer/og.png') }}{% endblock %}
{% block page_favicon %}{{ static('img/favicons/firefox/browser/developer/favicon.ico') }}{% endblock %}
{% block page_favicon_large %}{{ static('img/favicons/firefox/browser/developer/favicon-196x196.png') }}{% endblock %}
{% block page_ios_icon %}{{ static('img/favicons/firefox/browser/developer/apple-touch-icon.png') }}{% endblock %}

{% block page_css %}
  {{ css_bundle('protocol-split') }}
  {{ css_bundle('protocol-picto') }}
  {{ css_bundle('protocol-newsletter') }}
  {{ css_bundle('firefox_developer') }}
{% endblock %}

{% block body_id %}firefox-developer{% endblock %}
{% block body_class %}firefox-developer firefox-developer-home mzp-t-firefox{% endblock %}

{% block site_header %}
  {% with hide_nav_download_button=True %}
    {% include 'includes/protocol/navigation/navigation.html' %}
  {% endwith %}
{% endblock %}

{% block sub_navigation %}
  {{ sub_nav(
    title={
      'text':  ftl('sub-navigation-firefox'),
      'href':  "https://www.firefox.com/?redirect_source=mozilla-org",
      'icon':  static('protocol/img/logos/firefox/browser/logo.svg'),
      'cta_name': 'Firefox'
    },
    links=[
      {
        'text':  ftl('sub-navigation-enterprise'),
        'href':  url('firefox.enterprise.index'),
        'cta_name': 'Enterprise'
      },
      {
        'text':  ftl('sub-navigation-nightly-and-beta'),
        'href':  url('firefox.channel.desktop'),
        'cta_name': 'Nightly and Beta'
      },
      {
        'text':  ftl('sub-navigation-all-languages', fallback='download-button-systems-languages'),
        'href':  url('firefox.all'),
        'cta_name': 'All Languages'
      }
    ]
  ) }}
{% endblock %}

{% block content %}
<main>
  <div class="mzp-l-content mzp-t-content-md t-center">
    <div class="mzp-c-logo mzp-t-logo-xl mzp-t-product-developer mzp-l-logo-center"></div>
    <h1>{{ ftl('firefox-developer-firefox-developer-edition') }}</h1>
    <p>{{ ftl('firefox-developer-welcome-to-your-new-favorite') }}</p>

    {{ download_firefox('alpha', platform='desktop', dom_id='intro-download', download_location='primary cta') }}

    <p class="show-linux">{{ ftl('download-button-using-debian', attrs='href="https://support.mozilla.org/products/firefox/install-and-update-firefox#w_install-firefox-deb-package-for-debian-based-distributions" rel="external noopener"
     data-cta-text="Get help with your installation"')}}</p>
    <p class="intro-feedback-note">
      {{ ftl('firefox-developer-firefox-developer-edition-sends') }}
      <a href="{{ url('privacy.notices.firefox') }}#pre-release" class="more">{{ ftl('ui-learn-more') }}</a>
    </p>
  </div>

  {% include '/firefox/developer/includes/for-developers.html' %}

  {% include '/firefox/developer/includes/highlights.html' %}

  {% include '/firefox/developer/includes/features.html' %}

  <aside>
    {% call split(
      block_id='newsletter',
      image=resp_img('img/firefox/developer/mail.svg', optional_attributes={
        'width': '200',
        'loading': 'lazy'
      }),
      block_class='mzp-l-split-reversed',
      media_class='mzp-l-split-h-center'
    ) %}
      {% if LANG.startswith('en-') %}
        {{ email_newsletter_form(
          'app-dev',
          title='Get the most out of Firefox Developer Edition',
          desc='Learn about Dev Edition and subscribe to the Mozilla Developer Newsletter.',
          button_class='mzp-t-product mzp-t-lg',
          include_language=False) }}
      {% else %}
        {{ email_newsletter_form(
          spinner_color='#fff',
          button_class='mzp-c-button mzp-t-product mzp-t-lg') }}
      {% endif %}
    {% endcall %}
  </aside>


  <section class="mzp-t-dark t-engage">
    {% include '/firefox/developer/includes/engage.html' %}

    {% call split(
      image=resp_img('img/firefox/developer/browser.png',
        srcset={ 'img/firefox/developer/browser-high-res.png': '2x' },
        optional_attributes={ 'class': 'mzp-c-split-media-asset' }
      ),
      block_class='mzp-l-split-reversed mzp-l-split-center-on-sm-md',
      media_class='mzp-l-split-h-center',
      media_after=True
    ) %}
      <h2>{{ ftl('firefox-developer-download-the-firefox-browser') }}</h2>
      {{ download_firefox('alpha', platform='desktop', dom_id='footer-download', download_location='footer cta') }}
    {% endcall %}
  </section>
</main>
{% endblock %}

{% block email_form %}{% endblock %}

{% block js %}
  {{ js_bundle('newsletter') }}
{% endblock %}
